package com.supply.dl.utils;

import com.supply.dl.bean.BaseItemBean;
import com.supply.dl.widget.adapter.CommonNormalAdapter;

import java.util.List;

/**
 * Created by ${qianzhihe} on 2018/4/25.
 * 共用适配器创建工具类
 */

public class CommonNormalAdapterUtil {

    /**
     * 初始化CommonNormalAdapter
     * @param layooutResId 适配器列表的item资源布局
     * @param itemList 适配器列表的数据源
     * @param adapterFlag 展示界面的标识
     * @return
     */
    public static CommonNormalAdapter initCommonNormalAdapter(int layooutResId, List<BaseItemBean> itemList, int adapterFlag){
        CommonNormalAdapter commonNormalAdapter=new CommonNormalAdapter(layooutResId, itemList);
        commonNormalAdapter.setAdapterFlag(adapterFlag);
        return commonNormalAdapter;
    }


}
